home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / appsrcs.zip / APPSETUP.ZIP / APPREXIT.C < prev    next >
C/C++ Source or Header  |  1993-02-04  |  859b  |  38 lines

  1. #define STRICT
  2. #include <windows.h>
  3. #include <windowsx.h>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include "appsetup.h"
  8.  
  9. /*-------------------------------------------------------------------------*/
  10. BOOL WINAPI ReStartExitDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
  11.     {
  12.     HWND    hWndAppBar;
  13.  
  14.     switch(message)
  15.     {
  16.     case WM_INITDIALOG:
  17.         return TRUE;
  18.  
  19.     case WM_COMMAND:
  20.         switch(wParam)
  21.         {
  22.         case IDRESTARTEXIT_YES:
  23.             EndDialog(hDlg, 0);
  24.             if((hWndAppBar = GetAppBarWindow()) != NULL)
  25.             SendMessage(hWndAppBar, WM_COMMAND, WM_APPBAR_RESTART, 0L);
  26.             SendMessage(hWnd, WM_DESTROY, 0, 0);
  27.             return TRUE;
  28.  
  29.         case IDRESTARTEXIT_NO:
  30.             EndDialog(hDlg, 0);
  31.             SendMessage(hWnd, WM_DESTROY, 0, 0);
  32.             return TRUE;
  33.         }
  34.         break;
  35.     }
  36.     return FALSE;
  37.     }
  38.